CREATE PROCEDURE SP_Select_from_DB
AS
BEGIN
SET NOCOUNT ON
	SELECT  Personality.PersonalityLastName,
		Personality.PersonalityFirstName,
		Personality.PersonalityPatronymic,
		Personality.PersonalitySex,
		Personality.PersonalityMobilePhone,
		Personality.PersonalityInternalPhone,
		Personality.PersonalityEMAIL,
		Personality.PersonalityPhoto,
		PlaceResidence.PlaceResidenceCity,
		PlaceResidence.PlaceResidenceStreet,
		PlaceResidence.PlaceResidenceHome,
		PlaceResidence.PlaceResidenceFlat,
		Position.PositionName,
		Subdivision.SubdivisionName,
		Personality.PersonalityAdditionalInformation
	FROM  Personality
INNER JOIN PlaceResidence
ON Personality.PlaceResidenceID=PlaceResidence.PlaceResidenceID
INNER JOIN Position
ON Personality.PositionID=Position.PositionID
INNER JOIN Subdivision
ON Position.SubdivisionID=Subdivision.SubdivisionID
END;

--Вызов хранимой процедуры SP_Select_from_DB
--EXEC SP_Select_from_DB
